package com.observer.demo;

public class Test {
    public static void main(String[] args) {
        //创建接入方对象
        CurrentConditions currentConditions = new CurrentConditions();
        //让服务端知道那个网站接入了
        WeatherDataServer weatherDataServer = new WeatherDataServer(currentConditions);
        //服务端推送最新数据过去
        weatherDataServer.setData(1,2,3);

        //天气情况变化了
        System.out.println("========== 天气情况变化了 ==========");
        weatherDataServer.setData(1,2,3);
    }
}
